//
//  OneViewController.m
//  TabBar
//
//  Created by 温人米 on 2019/1/9.
//  Copyright © 2019年 温人米. All rights reserved.
//

#import "OneViewController.h"
#import "ViewController.h"
#import "RMOneViewController.h"
@interface OneViewController ()

@end

@implementation OneViewController

- (void)viewDidLoad {
    [super viewDidLoad];
    // Do any additional setup after loading the view.
    
    self.view.backgroundColor = [UIColor grayColor];
    self.navigationController.navigationBar.hidden = YES;
    
    UIButton *button = [UIButton buttonWithType:(UIButtonTypeCustom)];
    [self.view addSubview:button];
    button.frame = CGRectMake(0, 300, self.view.frame.size.width, 30);
    [button setTitle:@"按钮" forState:(UIControlStateNormal)];
    [button setTitleColor:[UIColor redColor] forState:(UIControlStateNormal)];
    [button addTarget:self action:@selector(buttonClick:) forControlEvents:(UIControlEventTouchUpInside)];
}

-(void)buttonClick:(UIButton *)btn{
    RMOneViewController *view = [[RMOneViewController alloc] init];
    view.hidesBottomBarWhenPushed = YES;
    [self.navigationController pushViewController:view animated:YES];
}

-(void)touchesBegan:(NSSet<UITouch *> *)touches withEvent:(UIEvent *)event{
    
    
}


@end
